home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / MakeOberon < prev    next >
Encoding:
Text File  |  1995-08-10  |  1.6 KB  |  46 lines  |  [TEXT/MPS ]

  1. # MakeOberon - Raw conversion of Pascal interface file
  2. #
  3. # SYNOPSIS
  4. #   MakeOberon source destination
  5. #
  6. # © Jürgen Geßwein 1994,1995
  7.  
  8. If `Exists "{2}"` == ""
  9.     Canon -a -s Rename.Dict "{1}" | Translate '@%' '. ' >"{2}"
  10.     Set Exit 0
  11.     Target "{2}"
  12.         MoveWindow 3 3;SizeWindow 480 280; Format -f Courier -s 10
  13.         Find •; Replace -c ∞ /∂{/ "(*"
  14.         Find •; Replace -c ∞ /∂}/ "*)"
  15.         Find •; Replace -c ∞ /([ ∂t]+=[ ∂t]+)®1/ "*®1"
  16.         Find •; Replace -c ∞ /∂'(????)®1∂'/ LONG∂(∂"®1∂"∂)
  17.         Find •; Replace -c ∞ /(PROCEDURE[ ∂t]+[a-z0-9_]+)®1/ "®1*"
  18.         Find •; Replace -c ∞ /∂*∂:/ "*():"
  19.         Find •; Replace -c ∞ /^/ "POINTER TO "
  20.         Find •; Replace /(File:≈)®1.p/ "®1.mod"
  21.             Replace /•UNIT/ "(*$TAGS-*)∂n(*$CALLING PASCAL*)∂nMODULE"
  22.             Replace -c ∞ /•([ ∂t]+[a-z][a-z0-9_]*)®1:/ "®1*:"
  23.         Find •; Replace -c ∞ /∂*[ ∂t]*:/ "*():"
  24.         Find •; Replace -c ∞ /2∂*∂*∂(/ "ASH(1,"
  25.         Find •; Replace -c ∞ /∂[0..0∂]/ "1 (*ΔΔ [0..0]*)"
  26.         Find •; Replace -c ∞ /∂[0..1∂]/ "2 (*ΔΔ [0..1]*)"
  27.         Find •; Replace -c ∞ /∂[0..2∂]/ "3 (*ΔΔ [0..2]*)"
  28.         Find •; Replace -c ∞ /∂[0..255∂]/ "256 (*ΔΔ [0..255]*)"
  29.         Find •; Replace -c ∞ /∂[0..([a-z0-9]+)®1-1∂]/ "(*ΔΔ [0..*)®1(*ΔΔ -1]*)"
  30.         Set CaseSensitive 1
  31.         Find •; Replace -c ∞ /1 ∂* ∂((ASH∂(1,[¬)]+∂))®1∂)/ "®1"
  32.         Find •; Replace -c ∞ /0∂+∂((≈)®1∂);/ "®1;"
  33.         Find •; Replace -c ∞ /UNIV/ "(*ΔΔ UNIV*)"
  34.         Find •; Replace -c ∞ /PACKED/ "(*ΔΔ PACKED*)"
  35.         Find •; Replace -c ∞ /$IFC/ "$IF"
  36.         Find •; Replace -c ∞ /$ELSEC/ "$ELSE"
  37.         Find •; Replace -c ∞ /$ENDC/ "$END"
  38.         Set CaseSensitive 0
  39.         Find •
  40.     Close -y "{Target}"
  41.     Set Exit 1
  42. Else
  43.     Beep
  44. End
  45.  
  46. # Replace /(PROCEDURE≈∂n)®1PROCEDURE/ "®1∂tEXTERNAL PASCAL;∂nPROCEDURE"